package single;

/**
 * @Author longhj
 * @Description 懒汉模式(线程安全)
 * @Date 2021/09/04 星期六 12:23
 */
public class SlackerModeThreadSafety {
    private static SlackerModeThreadSafety slackerModeThreadSafety;
    private SlackerModeThreadSafety() {
    }

    public static synchronized SlackerModeThreadSafety getSlackerModeThreadSafety() {
        if (null != slackerModeThreadSafety) {
            return slackerModeThreadSafety;
        }
        return new SlackerModeThreadSafety();
    }
}
